package net2;

import java.io.*;
import java.net.Socket;

public class TcpEasyClient {

    private static final int PORT = 4090;
    private static final String hostDomain = "localhost";
    private static final String hostIP = "127.0.0.1";
    public static void main(String[] args) throws IOException {
        Socket client = new Socket(hostDomain, PORT);
        OutputStream os = client.getOutputStream();
        PrintWriter pw = new PrintWriter(
                new OutputStreamWriter(os, "UTF-8"));
        pw.println("Don't be a 白日梦想家");
        pw.flush();
        System.out.println("已向服务器发送消息...");
        pw.close();
    }

}
